home *** CD-ROM | disk | FTP | other *** search
- Attribute VB_Name = "modRGB"
- '************************************************
- ' Module : modRGB
- ' Author : Yvo van Dillen
- ' Info : A RGB module
- ' If you ever want to create a painting
- ' program( or something... )
- ' You are going to need this module.
- ' For any questions or other code
- ' mail to : yvo23@hotmail.com
- ' Functions:
- ' GetRgb( color , red , green , blue )
- '************************************************
-
- Sub GetRgb(ByVal color As Long, ByRef red As Integer, ByRef green As Integer, ByRef blue As Integer)
- Dim temp As Long
-
- temp = (color And 255)
- red = temp And 255
-
- temp = Int(color / 256)
- green = temp And 255
-
- temp = Int(color / 65536)
- blue = temp And 255
-
- End Sub
-